package com.xry.healthy.service.impl;

import com.xry.common.core.domain.R;
import com.xry.healthy.entity.QhMedicalData;
import com.xry.healthy.enums.HealthyTypeEnum;
import com.xry.healthy.mapper.MessageMapper;
import com.xry.healthy.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author：ypc
 * @Date：2023/10/1
 * @Description：
 */
@Service
public class MessageServiceImpl implements MessageService {
    @Autowired
    private MessageMapper messageMapper;

    @Override
    public R messageType() {
        List<QhMedicalData> list=messageMapper.messageType(HealthyTypeEnum.MESSAGE.getValue());
        return R.ok(list);
    }

    @Override
    public R messageInfo(Long id) {
        QhMedicalData info=messageMapper.messageInfo(id);
        return R.ok(info);
    }
}
